package org.ali.creationalpattern.singletonpattern;

import org.ali.creationalpattern.singletonpattern.singletonobject.*;

/**
 * 单例模式
 */
public class Main {
    public static void main(String[] args) {
        SingletonObject1 object1 = SingletonObject1.getInstance();
        object1.showMessage();

        SingletonObject2 object2 = SingletonObject2.getInstance();
        object2.showMessage();

        SingletonObject3 object3 = SingletonObject3.getInstance();
        object3.showMessage();

        SingletonObject4 object4 = SingletonObject4.getInstance();
        object4.showMessage();

        SingletonObject5 object5 = SingletonObject5.getInstance();
        object5.showMessage();

        SingletonObject6.OBJECT.showMessage();
    }
}
